package com.qidian.mes.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.qidian.mes.excel.ToolTypeCodeFlagConverter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author 小可怎么都睡不够
 * @Description
 * @Time 2024-04-07 16:25
 */
@HeadRowHeight(25) // 表头行高
@ContentRowHeight(20) // 内容行高
@ColumnWidth(20) // 列宽
public class ToolType {
    @ExcelProperty(value = "工装夹具类型ID", index = 0)
    private Long toolTypeId;//工装夹具类型ID
    @ExcelProperty(value = "工装夹具类型编码", index = 1)
    private String toolTypeCode;//类型编码
    @ExcelProperty(value = "工装夹具类型名称", index = 2)
    private String toolTypeName;//类型名称
    @ExcelProperty(value = "是否编码管理", index = 3, converter = ToolTypeCodeFlagConverter.class)
    private Integer codeFlag;//是否编码管理 1是 2否
    @ExcelProperty(value = "保养维护类型", index = 4)
    private String maintenType;//保养维护类型
    @ExcelProperty(value = "保养周期", index = 5)
    private Integer maintenPeriod;//保养周期
    @ExcelProperty(value = "备注", index = 6)
    private String remark;//备注
    @ExcelProperty(value = "创建时间", index = 7)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;//创建时间
    @ExcelProperty(value = "修改时间", index = 8)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date modifyTime;//修改时间

    public ToolType() {
    }

    public ToolType(Long toolTypeId, String toolTypeCode, String toolTypeName, Integer codeFlag, String maintenType, Integer maintenPeriod, String remark, Date createTime, Date modifyTime) {
        this.toolTypeId = toolTypeId;
        this.toolTypeCode = toolTypeCode;
        this.toolTypeName = toolTypeName;
        this.codeFlag = codeFlag;
        this.maintenType = maintenType;
        this.maintenPeriod = maintenPeriod;
        this.remark = remark;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
    }

    public Long getToolTypeId() {
        return toolTypeId;
    }

    public void setToolTypeId(Long toolTypeId) {
        this.toolTypeId = toolTypeId;
    }

    public String getToolTypeCode() {
        return toolTypeCode;
    }

    public void setToolTypeCode(String toolTypeCode) {
        this.toolTypeCode = toolTypeCode;
    }

    public String getToolTypeName() {
        return toolTypeName;
    }

    public void setToolTypeName(String toolTypeName) {
        this.toolTypeName = toolTypeName;
    }

    public Integer getCodeFlag() {
        return codeFlag;
    }

    public void setCodeFlag(Integer codeFlag) {
        this.codeFlag = codeFlag;
    }

    public String getMaintenType() {
        return maintenType;
    }

    public void setMaintenType(String maintenType) {
        this.maintenType = maintenType;
    }

    public Integer getMaintenPeriod() {
        return maintenPeriod;
    }

    public void setMaintenPeriod(Integer maintenPeriod) {
        this.maintenPeriod = maintenPeriod;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public String toString() {
        return "ToolType{" +
                "toolTypeId=" + toolTypeId +
                ", toolTypeCode='" + toolTypeCode + '\'' +
                ", toolTypeName='" + toolTypeName + '\'' +
                ", codeFlag=" + codeFlag +
                ", maintenType='" + maintenType + '\'' +
                ", maintenPeriod=" + maintenPeriod +
                ", remark='" + remark + '\'' +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                '}';
    }
}
